Skip to content

fix(deskew): oblique default and handle alignment (#145 follow-up) - #155

Open
pablogventura wants to merge 1 commit into
ScanTailor-Advanced:masterfrom
pablogventura:fix/deskew-oblique-145-followup
Open

fix(deskew): oblique default and handle alignment (#145 follow-up)#155
pablogventura wants to merge 1 commit into
ScanTailor-Advanced:masterfrom
pablogventura:fix/deskew-oblique-145-followup

Conversation

@pablogventura

Copy link
Copy Markdown

Summary

Follow-up to #153 / v1.2.1 for the regression @zvezdochiot reported on #145 (screenshots on 1.2.1 @ 5eaac18):

  1. Oblique applied with global auto oblique off: Utils::buildDefaultParams() always seeded per-page oblique as Auto, so the first auto-deskew pass treated oblique as enabled. Task.cpp also reused prior per-page oblique mode during recompute instead of the Automatic oblique correction default / pending flag.
  2. Misaligned handles: deskew overlay arcs/handles were anchored to the viewport content area center, not the occupied image rect on screen.

Changes

  • Utils.cpp: default page oblique mode follows DefaultParams::isAutoOblique() (Manual when off).
  • Task.cpp: auto oblique during recompute uses pending flag → global default only; preserve manual oblique angle only when prior oblique mode was Manual.
  • ImageView.cpp: rotation/oblique origin and arc placement use getOccupiedWidgetRect().

Related #145. Does not close the longer-term ParamsDeskew/ParamsOblique refactor.

Test plan

  • Local ctest — 5/5 green
  • @zvezdochiot: please re-test on this branch (see Separate geometric distortions #145 comment):
    • New project → Step 3 Deskew, defaults untouched
    • Automatic oblique correction off → Oblique mode Manual, oblique , no shear applied
    • Rotation/oblique handles aligned with the page (windowed and maximized)
  • Maintainer smoke on Linux build from branch

Not for merge until @zvezdochiot confirms on this branch (or reports remaining issues).

…ailor-Advanced#145)

buildDefaultParams() always seeded oblique MODE_AUTO, so new pages ran
auto oblique even when Automatic oblique correction was off. Auto deskew
recompute also read prior per-page oblique mode instead of the global
default. Anchor deskew/oblique overlay handles to the occupied image rect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant